<template>
  <div>
    <van-nav-bar
      fixed
      title="收藏列表"
      left-arrow
      @click-left="$router.push('/user')"
    />
    <div class="main">
      <HouseList v-for="(item, index) in list" :key="index" :item="item" />
    </div>
  </div>
</template>

<script>
import HouseList from '@/components/HouseList.vue'
import { getStar } from '@/api/user'
export default {
  components: {
    HouseList
  },
  async created () {
    const { body } = await getStar()
    this.list = body
  },
  data () {
    return {
      list: []
    }
  }
}
</script>

<style scoped>
.main {
  margin: 46px 0 0;
}
</style>
